﻿@{
    ViewBag.Title = "消费种类配置";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@using SpeadFrm.Extensions
@model List<JStore.Web.Controllers.CardTypes.ViewModels.CardTypeModel>
<link href="../../Scripts/colorbox/colorbox.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="../../Scripts/colorbox/jquery.colorbox-min.js" type="text/javascript"></script>
<script src="../../Scripts/AdminCommon.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $(".box").colorbox({
            iframe: true,
            width: 700,
            height: 500,
            onClosed: function () {
                window.location.reload();
            }
        });
    })
</script>
<div class="right_box_card">
    <ul>
        <li class="right_box_card1"><a href="#">消费种类配置</a></li>
    </ul>
</div>
<div style="line-height: 40px;">
    <p class="avatar_btn">
        <a href="@Url.Action("Save", "CardTypes")" class="box" id="lnkAdd">新增配置</a>
    </p>
</div>
<table class="right_box_tab" style="margin-top: 10px;" width="100%" border="0" cellspacing="0"
    cellpadding="0">
    <tr height="30" class="tab_title">
        <td>
            Id
        </td>
        <td>
            消费类型
        </td>
        <td>
            消费名称
        </td>
        <td>
            消费金额
        </td>
        <td>
            结算比率
        </td>
        <td>
            购物折扣
        </td>
        <td>
            所属会员类型
        </td>
        <td>
        </td>
    </tr>
    @foreach (var item in Model)
    {
        <tr height="35" class="tab_td1" style="line-height: 26px;" onmouseover="this.className = 'tab_td2' "
            onmouseout=" this.className = 'tab_td1'">
            <td>
                @item.Id
            </td>
            <td>
                @item.CardClass.ToDescriptionName()
            </td>
            <td>
                @item.CardName
            </td>
            <td class="red">
                @item.Price
            </td>
            <td>
                @item.BalanceRate.ToString("p")
            </td>
            <td>
                @item.SaleRate 
            </td>
            <td>
                @item.UserTypeName
            </td>
            <td>
                @Html.ActionLink("修改", "Save", "CardTypes", new { item.Id }, new { @class = "box" })
                <a href="javascript:void(0);" onclick="DeletePost('@Url.Action("Delete", "CardTypes")',{id:@item.Id});">
                    删除</a>
            </td>
        </tr>
    }
</table>
